<%@ Page Language="C#" MasterPageFile="~/Demo.master" AutoEventWireup="true" CodeFile="Month.aspx.cs"
    Inherits="Scheduler_Month" Title="Month View (Scheduler) | DayPilot Pro Demo" %>

<%@ Register Assembly="DayPilot" Namespace="DayPilot.Web.Ui" TagPrefix="DayPilot" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <strong>Tip:</strong> Select a free time range (by dragging) and right click the
    selection to activate a context menu.<br />
    <br />
    <div style="width: 100%">
        <div style="float: left; width: 150px">
            <DayPilot:DayPilotNavigator ID="DayPilotNavigator1" runat="server" BoundDayPilotID="DayPilotScheduler1"
                CssClassPrefix="navigator_silver_" SelectMode="Month" ShowMonths="3" DataEndField="end"
                DataStartField="start" VisibleRangeChangedHandling="CallBack" OnVisibleRangeChanged="DayPilotNavigator1_VisibleRangeChanged" />
        </div>
        <div style="margin-left: 150px; min-height: 500px">
            <DayPilot:DayPilotScheduler ID="DayPilotScheduler1" runat="server" Days="31" StartDate="2010-01-01"
                DataStartField="start" DataEndField="end" DataTextField="name" DataValueField="id"
                HeaderFontSize="8pt" HeaderHeight="17" DataResourceField="column" EventHeight="40"
                CellDuration="1440" CellWidth="30" CellGroupBy="Week" TimeRangeSelectedHandling="Hold"
                ContextMenuSelectionID="DayPilotMenu1" ContextMenuID="DayPilotMenu2" ClientObjectName="dps1"
                OnEventMenuClick="DayPilotScheduler1_EventMenuClick" Width="100%" OnTimeRangeSelected="DayPilotScheduler1_TimeRangeSelected"
                OnTimeRangeMenuClick="DayPilotScheduler1_TimeRangeMenuClick" OnCommand="DayPilotScheduler1_Command"
                
                CssClassPrefix="scheduler_silver_"
                HourNameBackColor="#F0F0F0"
                
                >
                <Resources>
                    <DayPilot:Resource Name="Room A" Value="A" />
                    <DayPilot:Resource Name="Room B" Value="B" />
                    <DayPilot:Resource Name="Room C" Value="C" />
                    <DayPilot:Resource Name="Room D" Value="D" />
                    <DayPilot:Resource Name="Room E" Value="E" />
                    <DayPilot:Resource Name="Room F" Value="F" />
                    <DayPilot:Resource Name="Room G" Value="G" />
                    <DayPilot:Resource Name="Room H" Value="H" />
                </Resources>
            </DayPilot:DayPilotScheduler>
        </div>
    </div>
    <br />
    <br />
    <DayPilot:DayPilotMenu ID="DayPilotMenu1" runat="server" CssClassPrefix="menu_">
        <DayPilot:MenuItem Action="JavaScript" JavaScript="dps1.timeRangeSelectedCallBack(e.start, e.end, e.resource);"
            Text="Create new event (JavaScript)" />
        <DayPilot:MenuItem Action="PostBack" Command="Insert" Text="Create new event (PostBack)" />
        <DayPilot:MenuItem Action="CallBack" Command="Insert" Text="Create new event (CallBack)" />
        <DayPilot:MenuItem Text="-"></DayPilot:MenuItem>
        <DayPilot:MenuItem Action="JavaScript" JavaScript="alert('Start: ' + e.start.toString() + '\nEnd: ' + e.end.toString() + '\nResource id: ' + e.resource);"
            Text="Show selection details" />
        <DayPilot:MenuItem Action="JavaScript" JavaScript="dps1.clearSelection();" Text="Clean selection" />
    </DayPilot:DayPilotMenu>
    <DayPilot:DayPilotMenu ID="DayPilotMenu2" runat="server" CssClassPrefix="menu_">
        <DayPilot:MenuItem Text="Open" Action="JavaScript" JavaScript="alert('Opening event (id ' + e.value() + ')');">
        </DayPilot:MenuItem>
        <DayPilot:MenuItem Text="Send" Action="JavaScript" JavaScript="alert('Sending event (id ' + e.value() + ')');">
        </DayPilot:MenuItem>
        <DayPilot:MenuItem Text="-" Action="NavigateUrl"></DayPilot:MenuItem>
        <DayPilot:MenuItem Text="Delete (CallBack)" Action="Callback" Command="Delete"></DayPilot:MenuItem>
        <DayPilot:MenuItem Action="PostBack" Command="Delete" Text="Delete (PostBack)" />
        <DayPilot:MenuItem Action="NavigateUrl" NavigateUrl="javascript:alert('Going somewhere else (id {0})');"
            Text="NavigateUrl test" />
    </DayPilot:DayPilotMenu>
</asp:Content>
